#include <bits/stdc++.h>
#define ll long long
using namespace std;

const int Maxn=1e6+7;
bool vs[Maxn];

int main(){
	freopen("mcmf.in","r",stdin);
	freopen("mcmf.out","w",stdout);
	
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		int k,x;
		cin>>k>>x;
		while(vs[x]) ++x;
		vs[x]=1;
	}
	int len=1e6;
	bool tt=0;
	for(int i=len;~i;i--){
		if(vs[i]) tt=1;
		if(tt==1) printf("%d",vs[i]);
	}

	return 0;
}
